In a web page loading method, page content is loaded and displayed by scrolling, in combination with dynamically creating and destroying nodes. When loading and displaying page content by scrolling, loading and displaying content are performed in a certain order of first loading a start page content and displaying the start page content in a browse window. As a user drags a scroll bar and a content display area moves downward gradually, corresponding page data may be gradually acquired from the background, and then loaded and displayed.
As shown in FIG. 1, after the user triggers opening of a page, page data of a default initial screen is loaded first, that is, areas A and B; then, as the user drags a scroll bar downward to browse data, data of areas C, D, E, and F is loaded and displayed one after another in the certain order.
When dynamically creating and destroying nodes, content nodes included in page content within a display area of a browse window are dynamically created. While dynamically destroying content nodes out of the display area of the browse window, only a placeholder node is retained for identifying page content displayed previously.
As shown in FIG. 2, after the user triggers opening of a page, page data of a default initial screen is loaded first, that is, areas A and B, and content nodes of the areas A and B are created; then, as the user drags a scroll bar downward to browse data, areas C and D are loaded in order, content nodes of the areas C and D are created, and at the same time, the content nodes previously displayed in the areas A and B are destroyed; as the user continues to drag the scroll bar downward to browse data, areas E and F are loaded in the order, content nodes of the areas E and F are created, and at the same time, the content nodes previously displayed in the areas C and D are destroyed.
However, such page loading method can only load page content in a certain order with a single direction. If the user needs to browse other page content after the start page, the user needs to wait until loading of all page content before the desired page content is completed. For example, in FIG. 1, if the user needs to browse page content of areas E and F, the user needs to wait until loading of page content of the previous areas A, B, C and D is completed, and then, the page content of the areas E and F can be loaded, which is time-consuming and slows down page loading, and fails to implement random access to content of the page and content searching and locating.